<include file="public@meta" />
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <!--            <div class="layui-card-header">-->
        <!--                站点信息-->
        <!--            </div>-->
        <div class="layui-card-body layui-row layui-col-space15">
            <form class="layui-form" action="{:url('admin/setting/site')}" method="post">
                <div class="layui-col-md4">
                    <div class="layui-card">
                        <div class="layui-card-header">
                            站点信息
                        </div>
                        <div class="layui-card-body">
                            <div class="layui-form-item">
                                <label class="layui-form-label"><span class="form-required">*</span>网站名称</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" lay-verify="required"
                                           name="options[site_name]" value="{$site_name|default=''}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">备案信息</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" name="options[site_icp]"
                                           value="{$site_icp|default=''}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">公司名称</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" name="options[company_name]"
                                           value="{$company_name|default=''}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">联系地址</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" name="options[address]"
                                           value="{$address|default=''}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">联系电话</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" name="options[phone]"
                                           value="{$phone|default=''}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">工作时间</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" name="options[worktime]"
                                           value="{$worktime|default=''}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">在线QQ</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" name="options[qq]"
                                           value="{$qq|default=''}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">电子邮箱</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" lay-verify="email"
                                           name="options[site_email]"
                                           value="{$site_email|default=''}">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-card">
                        <div class="layui-card-header">SEO设置</div>
                        <div class="layui-card-body">
                            <div class="layui-form-item">
                                <label class="layui-form-label">SEO标题</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" name="options[site_seo_title]"
                                           value="{$site_seo_title|default=''}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">SEO关键词</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" name="options[site_seo_keywords]"
                                           value="{$site_seo_keywords|default=''}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">SEO摘要</label>
                                <div class="layui-input-block">
                                    <textarea class="layui-textarea" name="options[site_seo_description]">{$site_seo_description|default=''}</textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">统计代码</label>
                                <div class="layui-input-block">
                                    <textarea class="layui-textarea" name="options[site_analytics]">{$site_analytics|default=''}</textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">版权信息</label>
                                <div class="layui-input-block">
                                    <textarea class="layui-textarea" name="options[site_copyright]">{$site_copyright|default=''}</textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-card">
                        <div class="layui-card-header">
                            图片设置
                        </div>
                        <div class="layui-card-body">
                            <div class="layui-form-item">
                                <label class="layui-form-label">Logo</label>
                                <div class="layui-input-block">
                                    <a id="btn-logo">
                                        <empty name="logo">
                                            <img src="__STATIC__/images/default-thumb.png" id="logo-preview"
                                                 width="135"
                                                 height="135" style="cursor: pointer"/>
                                            <else/>
                                            <img src="{:get_image_url($logo)}" id="logo-preview" width="135"
                                                 height="135" style="cursor: pointer"/>
                                        </empty>
                                    </a>
                                    <input type="hidden" name="options[logo]" id="input-logo"
                                           value="{$logo|default=''}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">公众号</label>
                                <div class="layui-input-block">
                                    <a id="btn-wechat">
                                        <empty name="wechat">
                                            <img src="__STATIC__/images/default-thumb.png" id="wechat-preview"
                                                 width="135" height="135" style="cursor: pointer"/>
                                            <else/>
                                            <img src="{:get_image_url($wechat)}" id="wechat-preview" width="135"
                                                 height="135" style="cursor: pointer"/>
                                        </empty>
                                    </a>
                                    <input type="hidden" name="options[wechat]" id="input-wechat"
                                           value="{$wechat|default=''}">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="save">
                            保存修改
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script>
    layui.config({
        base: '__STATIC__/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index', //主入口模块
        layCenter: 'lib/layCenter', //主入口模块
    }).use(['index', 'form','layCenter','common'], function(){
        var $ = layui.$,
            form = layui.form,
            layCenter = layui.layCenter,
            common = layui.common;
        //监听提交
        form.on('submit(layui-btn-form-submit)', function(data){
            console.log(data.field);
            layCenter.FormSubmit("{:url('edit')}",data.field,true);
        });

    });
</script>
</body>
</html>